package ArryTest;

import java.util.Scanner;

//用一个数组存储本组学员的姓名，先从键盘输入小组人数，再从键盘输入每一个学员的姓名，然后遍历显示
public class Test02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入小组人数");
        int num = sc.nextInt();
        int[] arr = new int[num];
        for (int i = 0; i < num; i++) {
            System.out.println("请输入小组第"+(i+1)+"个学生姓名");
            arr[i] = sc.nextInt();
        }
        for (int i = 0; i < num; i++) {
            System.out.println("输出学生姓名为"+arr[i]+"\t");
        }

    }
}
